﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Phone_Client.Commands_Utils;

namespace Phone_Client.ViewModels
{
    public class RegistrationPageVM : IViewModelBase
    {
        #region Fields

        private String      _email, _password, _question, _answer;
        private ICommand _cancelcmd, _createcmd;
        #endregion

        #region Properties

        public String Email 
        {
            get { return _email; }
            set
            {
                if (_email == value) return;
                _email = value;
                RaisePropertyChanged("Email");
            }
        }

        public String Password
        {
            get { return _password; }
            set
            {
                if (_password == value) return;
                _password = value;
                RaisePropertyChanged("Password");
            }
        }

        public String Question
        {
            get { return _question; }
            set
            {
                if (_question == value) return;
                _question = value;
                RaisePropertyChanged("Question");
            }
        }

        public String Answer
        {
            get { return _answer; }
            set
            {
                if (_answer == value) return;
                _answer = value;
                RaisePropertyChanged("Answer");
            }
        }

        #endregion

        #region Commands

        public ICommand CancelCmd
        {
            get { return _cancelcmd; }
        }

        public ICommand CreateCmd
        {
            get { return _createcmd; }
        }
        #endregion

        #region Commands Functions

        public void CancelFunc() { }
        public void CreateFunc() { }

        #endregion

        #region Functions

        #endregion

        #region Ctor

        public RegistrationPageVM()
        {
            _email = _password = _question = _answer = String.Empty;
            _cancelcmd = new RelayCommand(CancelFunc) { IsEnabled = true };
            _createcmd = new RelayCommand(CreateFunc) { IsEnabled = true };
        }

        #endregion
    }
}
